package com.sjsu.cmpe239.services;


import com.sjsu.cmpe239.database.DatabaseManager;
import com.sjsu.cmpe239.exceptions.*;
/**
 * 
 * @author Deepika Gohil
 *
 */
public class UserService 
{

	/*
	 * This method will validate the user's credentials.
	 * If the credentials will match, it will return 1,
	 * otherwise it will return 0. 
	 */
	public int authenticateUser(String userName, String password)
	{
		//TODO
		
		return new DatabaseManager().authenticateUser(userName, password);
	}
	
	/*
	 * 1 for successful
	 * 0 for unsuccessful
	 * throw duplicateuserid exception if the userid already exists!
	 */
	public int registerUser(String firstName, String lastName, String username, String password) throws DuplicateUserIdException	
	{
		//TODO
		
		return new DatabaseManager().registerUser();
	}
	
}
